.class public Les/u8;
.super Ljava/lang/Object;
.source "DefaultFilter.java"

# interfaces
.implements Les/v8;


# instance fields
.field protected a:I

.field private b:I

.field private c:I

.field private d:I

.field private e:I

.field private final f:Ljava/lang/String;

.field private final g:Ljava/lang/String;

.field private h:Ljava/nio/IntBuffer;


# direct methods
.method public constructor <init>()V
    .locals 2

    const-string v0, "uniform mat4 uMVPMatrix;\nuniform mat4 uSTMatrix;\nattribute vec4 aPosition;\nattribute vec4 aTextureCoord;\nvarying vec2 vTextureCoord;\nvoid main() {\n  gl_Position = uMVPMatrix * aPosition;\n  vTextureCoord = (uSTMatrix * aTextureCoord).xy;\n}\n"

    const-string v1, "#extension GL_OES_EGL_image_external : require\nprecision mediump float;\nvarying vec2 vTextureCoord;\nuniform samplerExternalOES sTexture;\nvoid main() {\n  gl_FragColor = texture2D(sTexture, vTextureCoord);\n}\n"

    .line 1
    invoke-direct {p0, v0, v1}, Les/u8;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;)V
    .locals 1

    .line 2
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, -0x1

    .line 3
    iput v0, p0, Les/u8;->a:I

    const/4 v0, 0x1

    .line 4
    invoke-static {v0}, Ljava/nio/IntBuffer;->allocate(I)Ljava/nio/IntBuffer;

    move-result-object v0

    iput-object v0, p0, Les/u8;->h:Ljava/nio/IntBuffer;

    .line 5
    iput-object p1, p0, Les/u8;->f:Ljava/lang/String;

    .line 6
    iput-object p2, p0, Les/u8;->g:Ljava/lang/String;

    return-void
.end method


# virtual methods
.method public a()I
    .locals 1

    const v0, 0x8d65

    return v0
.end method

.method public final a(ILjava/nio/FloatBuffer;IIILjava/nio/FloatBuffer;I[F[FLjava/nio/ShortBuffer;J)V
    .locals 12

    move-object v0, p0

    move-wide/from16 v1, p11

    .line 1
    invoke-virtual {p0}, Les/u8;->a()I

    move-result v3

    .line 2
    iget-object v4, v0, Les/u8;->h:Ljava/nio/IntBuffer;

    const v5, 0x8b8d

    invoke-static {v5, v4}, Landroid/opengl/GLES20;->glGetIntegerv(ILjava/nio/IntBuffer;)V

    .line 3
    iget v4, v0, Les/u8;->a:I

    invoke-static {v4}, Landroid/opengl/GLES20;->glUseProgram(I)V

    const-string v4, "glUseProgram"

    .line 4
    invoke-static {v4}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/lang/String;)V

    const v4, 0x84c0

    .line 5
    invoke-static {v4}, Landroid/opengl/GLES20;->glActiveTexture(I)V

    move v4, p1

    .line 6
    invoke-static {v3, p1}, Landroid/opengl/GLES20;->glBindTexture(II)V

    const/4 v4, 0x0

    move-object v10, p2

    .line 7
    invoke-virtual {p2, v4}, Ljava/nio/FloatBuffer;->position(I)Ljava/nio/Buffer;

    .line 8
    iget v5, v0, Les/u8;->d:I

    const/16 v7, 0x1406

    const/4 v8, 0x0

    move/from16 v6, p4

    move v9, p3

    invoke-static/range {v5 .. v10}, Landroid/opengl/GLES20;->glVertexAttribPointer(IIIZILjava/nio/Buffer;)V

    const-string v5, "glVertexAttribPointer maPosition"

    .line 9
    invoke-static {v5}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/lang/String;)V

    .line 10
    iget v5, v0, Les/u8;->d:I

    invoke-static {v5}, Landroid/opengl/GLES20;->glEnableVertexAttribArray(I)V

    const-string v5, "glEnableVertexAttribArray maPositionHandle"

    .line 11
    invoke-static {v5}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/lang/String;)V

    move-object/from16 v5, p6

    .line 12
    invoke-virtual {v5, v4}, Ljava/nio/FloatBuffer;->position(I)Ljava/nio/Buffer;

    .line 13
    iget v6, v0, Les/u8;->e:I

    const/4 v7, 0x2

    const/16 v8, 0x1406

    const/4 v9, 0x0

    move/from16 v10, p7

    move-object/from16 v11, p6

    invoke-static/range {v6 .. v11}, Landroid/opengl/GLES20;->glVertexAttribPointer(IIIZILjava/nio/Buffer;)V

    const-string v5, "glVertexAttribPointer maTextureHandle"

    .line 14
    invoke-static {v5}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/lang/String;)V

    .line 15
    iget v5, v0, Les/u8;->e:I

    invoke-static {v5}, Landroid/opengl/GLES20;->glEnableVertexAttribArray(I)V

    const-string v5, "glEnableVertexAttribArray maTextureHandle"

    .line 16
    invoke-static {v5}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/lang/String;)V

    .line 17
    iget v5, v0, Les/u8;->b:I

    const/4 v6, 0x1

    move-object/from16 v7, p8

    invoke-static {v5, v6, v4, v7, v4}, Landroid/opengl/GLES20;->glUniformMatrix4fv(IIZ[FI)V

    const-string v5, "glUniformMatrix4fv"

    .line 18
    invoke-static {v5}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/lang/String;)V

    .line 19
    iget v7, v0, Les/u8;->c:I

    move-object/from16 v8, p9

    invoke-static {v7, v6, v4, v8, v4}, Landroid/opengl/GLES20;->glUniformMatrix4fv(IIZ[FI)V

    .line 20
    invoke-static {v5}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/lang/String;)V

    .line 21
    invoke-virtual {p0, v1, v2}, Les/u8;->b(J)V

    const/4 v5, 0x5

    move/from16 v6, p5

    .line 22
    invoke-static {v5, v4, v6}, Landroid/opengl/GLES20;->glDrawArrays(III)V

    const-string v5, "glDrawArrays"

    .line 23
    invoke-static {v5}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/lang/String;)V

    .line 24
    invoke-virtual {p0, v1, v2}, Les/u8;->a(J)V

    .line 25
    iget v1, v0, Les/u8;->d:I

    invoke-static {v1}, Landroid/opengl/GLES20;->glDisableVertexAttribArray(I)V

    .line 26
    iget v1, v0, Les/u8;->e:I

    invoke-static {v1}, Landroid/opengl/GLES20;->glDisableVertexAttribArray(I)V

    .line 27
    invoke-static {v3, v4}, Landroid/opengl/GLES20;->glBindTexture(II)V

    .line 28
    iget-object v1, v0, Les/u8;->h:Ljava/nio/IntBuffer;

    invoke-virtual {v1, v4}, Ljava/nio/IntBuffer;->get(I)I

    move-result v1

    invoke-static {v1}, Landroid/opengl/GLES20;->glUseProgram(I)V

    return-void
.end method

.method protected a(J)V
    .locals 0

    return-void
.end method

.method protected b()V
    .locals 0

    return-void
.end method

.method protected b(J)V
    .locals 0

    return-void
.end method

.method protected c()V
    .locals 0

    return-void
.end method

.method public final destroy()V
    .locals 1

    .line 1
    invoke-static {}, Landroid/opengl/GLES20;->glFinish()V

    .line 2
    iget v0, p0, Les/u8;->a:I

    if-lez v0, :cond_0

    .line 3
    invoke-static {v0}, Landroid/opengl/GLES20;->glDeleteProgram(I)V

    :cond_0
    const/4 v0, -0x1

    .line 4
    iput v0, p0, Les/u8;->a:I

    .line 5
    invoke-virtual {p0}, Les/u8;->b()V

    return-void
.end method

.method public final init()V
    .locals 2

    .line 1
    iget-object v0, p0, Les/u8;->f:Ljava/lang/String;

    iget-object v1, p0, Les/u8;->g:Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    iput v0, p0, Les/u8;->a:I

    if-eqz v0, :cond_0

    const-string v1, "aPosition"

    .line 2
    invoke-static {v0, v1}, Landroid/opengl/GLES20;->glGetAttribLocation(ILjava/lang/String;)I

    move-result v0

    iput v0, p0, Les/u8;->d:I

    const-string v0, "glGetAttribLocation aPosition"

    .line 3
    invoke-static {v0}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/lang/String;)V

    .line 4
    iget v0, p0, Les/u8;->d:I

    invoke-static {v0, v1}, Lcom/esfile/screen/recorder/media/glutils/b;->a(ILjava/lang/String;)V

    .line 5
    iget v0, p0, Les/u8;->a:I

    const-string v1, "aTextureCoord"

    invoke-static {v0, v1}, Landroid/opengl/GLES20;->glGetAttribLocation(ILjava/lang/String;)I

    move-result v0

    iput v0, p0, Les/u8;->e:I

    const-string v0, "glGetAttribLocation aTextureCoord"

    .line 6
    invoke-static {v0}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/lang/String;)V

    .line 7
    iget v0, p0, Les/u8;->e:I

    invoke-static {v0, v1}, Lcom/esfile/screen/recorder/media/glutils/b;->a(ILjava/lang/String;)V

    .line 8
    iget v0, p0, Les/u8;->a:I

    const-string v1, "uMVPMatrix"

    invoke-static {v0, v1}, Landroid/opengl/GLES20;->glGetUniformLocation(ILjava/lang/String;)I

    move-result v0

    iput v0, p0, Les/u8;->b:I

    const-string v0, "glGetUniformLocation uMVPMatrix"

    .line 9
    invoke-static {v0}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/lang/String;)V

    .line 10
    iget v0, p0, Les/u8;->b:I

    invoke-static {v0, v1}, Lcom/esfile/screen/recorder/media/glutils/b;->a(ILjava/lang/String;)V

    .line 11
    iget v0, p0, Les/u8;->a:I

    const-string v1, "uSTMatrix"

    invoke-static {v0, v1}, Landroid/opengl/GLES20;->glGetUniformLocation(ILjava/lang/String;)I

    move-result v0

    iput v0, p0, Les/u8;->c:I

    const-string v0, "glGetUniformLocation uSTMatrix"

    .line 12
    invoke-static {v0}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/lang/String;)V

    .line 13
    iget v0, p0, Les/u8;->c:I

    invoke-static {v0, v1}, Lcom/esfile/screen/recorder/media/glutils/b;->a(ILjava/lang/String;)V

    .line 14
    invoke-virtual {p0}, Les/u8;->c()V

    return-void

    .line 15
    :cond_0
    new-instance v0, Ljava/lang/RuntimeException;

    const-string v1, "failed creating program"

    invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v0
.end method
